<?php

@session_start();

define('AUTH_BASE_URL', 'http://www.k1.vn/v3');

define('AUTH_RETURN_BASE_URL', 'http://www.k1.vn/user/connect');

define('APP_PATH', dirname(__FILE__));

define('GOOGLE_KEY', '110783812378.apps.googleusercontent.com');
define('GOOGLE_SECRET', '6ri-qGqp4Ukx_kOVHlzMobBZ');

define('TWITTER_KEY', 'S3qv6lHRVZ4jCYhRFswxaA');
define('TWITTER_SECRET', 'VsewJr7mla4nPR1Eaxfq5RrvFQTNvGFt7m0ENyjJBd8');

define('YAHOO_KEY', '');
define('YAHOO_SECRET', '');
define('YAHOO_APP_ID', '');

define('FACEBOOK_APPID', '364959823583090');
define('FACEBOOK_SECRET', 'f98e3bc4f4f935ec1874fcb468a94fed');

function processCentralServiceResponseData($data)
{
    $json = urlencode(json_encode($data));

    $returnurl = AUTH_RETURN_BASE_URL;

    $sForm = '<form id="dataform" method="post" action="' . $returnurl . '" >
    <input type="hidden" name="json" value= \'' . $json . '\' />
    <input type="hidden" name="service" value=" ' . AUTH_SERVICE . '" />
    </form>
    <script type="text/javascript">document.getElementById("dataform").submit();</script>
    ';
    echo $sForm;
    exit ;
}
